//using Microsoft.VisualBasic;
using System;
using System.Diagnostics;
using log4net;
using NHibernate;
using NHibernate.Cfg;
using System.Reflection;
namespace NCS
{
	public class Class1
	{
		public static Configuration configuration;
        public static ISession session;
		static Class1()
		{
			//log4net.Config.XmlConfigurator.Configure()
			configuration = new Configuration();
			configuration.Configure();
            Assembly a=Assembly.GetExecutingAssembly();
            string initpath = System.IO.Path.GetDirectoryName(a.Location);
            configuration.SetProperty("hibernate.connection.connection_string", "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + initpath + "\\data.mdb");
			configuration.AddAssembly(a);
            ISessionFactory factory = configuration.BuildSessionFactory();
            session = factory.OpenSession();
		}

	}
}
